import asyncio
import time


async def f1():
    for i in range(3):
        print("f1:", i)
        await asyncio.sleep(1)
    return "f1完成"


async def f2():
    for i in range(3):
        print("f2:", i)
        await asyncio.sleep(1)
    return "f2完成"


async def main():
    res = await asyncio.gather(f1(), f2())
    print(res)


if __name__ == "__main__":
    start = time.time()
    asyncio.run(main())
    print("耗时：", time.time() - start)
